var mongoose=require('mongoose');
const Schema=mongoose.Schema;
var mongoosePaginate=require('mongoose-paginate');
//定义一个普通数据模型
var UserSchema=new mongoose.Schema({
	name:String,
	password:String,
	mail:String,
	city:String,
	date:{type:Date,default:Date.now},
	desc:String
});
//将数据模型应用分页插件
UserSchema.plugin(mongoosePaginate);//schema数据模型里使用了分页插件


module.exports=mongoose.model('User',UserSchema,'user');
